module.exports = app => {
    const {STRING,DOUBLE} = app.Sequelize;
    const Hero = app.model.define("Hero",{
        name:STRING,
        age:DOUBLE
    })
    Hero.associate = function(){ // 所属哪个大陆 指向该大陆组件
        app.model.Hero.belongsTo(app.model.Country,{
            foreignKey:"country_id",
            as:"country"
        })
    }
    return Hero;
}